//
//  ZHFSongDescriptionView.m
//  GoTraveling
//
//  Created by dllo on 15/12/28.
//  Copyright © 2015年 开发华佗. All rights reserved.
//

#import "ZHFSongDescriptionView.h"

@interface ZHFSongDescriptionView ()<UIWebViewDelegate>

@property (nonatomic,strong) UIWebView *webView;

@end

@implementation ZHFSongDescriptionView


-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubView];
    }
    return self;
}

- (void)createSubView{
    
    self.backgroundColor = [UIColor whiteColor];
    
    self.webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 0,self.frame.size.width , self.frame.size.height)];
    [self addSubview:self.webView];
    self.webView.delegate = self;
    
    self.webView.scrollView.contentMode = UIViewContentModeScaleAspectFit;
    _webView.scrollView.bounces = NO;
    
    
}


-(void)setWebUrl:(NSString *)webUrl{
    
    NSURL *url = [NSURL URLWithString: webUrl];
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    [self.webView loadRequest:request];
}


@end
